/**战斗场景中玩家操控的英雄类
 * time 2019/8/20
 * author:zzw
 * dsc:
 */
function player_hero() {
    this.createPlayer_hero = function ( hero_prefab, herosAtlas, pos, parent_Node, blockArr) {
        var _hero=cc.instantiate(hero_prefab);
        // _hero.getComponent(cc.Sprite).spriteFrame=herosAtlas.getSpriteFrame(data.key+"0");
        _hero.x = pos.x;
        _hero.y = pos.y;
        _hero.parent = parent_Node;
        blockArr.push(_hero);

    };
    this.poolPlayer_hero = function (heroPool, obj) {
        heroPool.put(obj);
    }
}

var _instance = null;
module.exports = function () {
    if (!_instance) {
        _instance = new player_hero();
    }
    return _instance;
};